<!doctype html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>email-admin</title>
    <!--build:css ./src/less/index.min.css-->
    <link rel="stylesheet" href="./src/less/common/common.css">
    <link rel="stylesheet" href="./src/component/com-component-20190601.min.css">
    <!--<link rel="stylesheet" href="./src/less/common/grid.css">-->
    <link rel="stylesheet" href="./src/less/common/icon.css">
    <link rel="stylesheet" href="./src/component/quill/quill.snow.css">
    <!--endbuild-->

    <link rel="stylesheet" href="//at.alicdn.com/t/font_830090_d0ubbl95p3t.css">
    <script src="./src/js/common.js"></script>

    <!--build:js ./src/js/index.min.js-->
    <script src="./src/lib/jquery-latest.js"></script>
    <script src="./src/js/ajax.js"></script>
    <script src="./src/lib/director.js"></script>
    <script src="./src/lib/template-web.js"></script>
    <script src="./src/component/com-component-20190601.min.js"></script>
    <!--endbuild-->
</head>
<body>
<div class="container">
    <!--左侧导航-->
    <section class="menu">
        <div class="menu-title">
            <img src="src/img/logo-head.png" alt="">
        </div>
        <ul class="menu-content">
            <!--<li class="content-list">
                <i class="iconfont icon-tubiao15"></i>
            </li>
            <li class="content-list">
                <i class="iconfont icon-baobiaotongji"></i>
            </li>
            <li class="content-list">
                <i class="iconfont icon-lishixiao"></i>
            </li>-->
            <li data-name="processed" class="content-list active">
                <a href="#processed"><i class="iconfont icon-shoujianxiang"></i></a>
            </li>
            <li data-name="inbox" class="content-list">
                <a href="#inbox"><i class="iconfont icon-shoujianchenggong"></i></a>
            </li>
            <li data-name="resolution" class="content-list outsource" title="paypal">
                <a href="#resolution"><i class="iconfont icon-paypal1"></i></a>
            </li>
            <li data-name="worldpay" class="content-list outsource" title="worldpay">
                <a href="#worldpay"><i class="iconfont icon-world" style="font-size: 24px;"></i></a>
            </li>
            <li data-name="coupon" class="content-list outsource">
                <a href="#coupon"><i class="iconfont icon-youhuiquan"></i></a>
            </li>
            <li data-name="img" class="content-list outsource">
                <a href="#img"><i class="iconfont icon-ai231"></i></a>
            </li>
            <!--<li class="content-list">
                <i class="iconfont icon-66"></i>
            </li>
            <li class="content-list">
                <i class="iconfont icon-shezhi"></i>
            </li>-->
        </ul>
    </section>
    <!--头部固定-->
    <div class="main-nav hide">
        <div class="nav">
            <i class="iconfont icon-icon-test"></i>
        </div>
    </div>

    <!--插入内容-->
    <div class="main-content">
    </div>
</div>


<!--staffList-->
<script id="inbox-layerSelect" type="text/html">
    <div class="staff-box">
        <h4 class="box-title">
            Please select a person to assign:
        </h4>
        <i class="box-close">&times;</i>
        <section data-name="staffListObj" class="com-select">
            <div class="sel-item">
                <input class="sel-head" type="text" value="" readonly placeholder="please select"/>
                <input type="hidden" value="">
                <i class="sel-icon"></i>
            </div>
            <ul class="sel-content">
                {{each data as v i}}
                <li data-val="{{v.email_cs_admin_id}}" class="sel-list">{{v.nick_name}}</li>
                {{/each}}
            </ul>
        </section>
        <textarea class="mt5 hide" name="" id="markContentNotes" placeholder="Notes" style="max-width:100%;min-width:100%;"></textarea>
        <button class="staff-button btn-a mt20">Confirm</button>
    </div>
</script>

<script>

window.para = {
    //客服数据html
    path:(function(){
        if(com.getEnv() == 'production' || com.getEnv() == 'testing'){
            return 'inbox_list.html'
        }else{
            return '';
        }
    })(),
    staffList:'',
    staffId:'',
    token:(function(){
        if(com.getEnv() == 'production' || com.getEnv() == 'testing'){
            return com.getCookie("api_token") ? com.getCookie("api_token") : '';
        }else{
            return 'ec4199002b34475bc00cdeb2a56feb9a70242e75';
        }
    })(),
    token2:(function(){
        return com.getCookie("api_token2") ? com.getCookie("api_token2") : '4ne1ofa+rJrJeNyeXxhJRXMdgJHyLLZIofRNyal0/RKy7dFKBZkdrz/DjEtEx16sF+/1SyZaC9CaQqExzCrLrTnJ89bzvkd1PsM4acyfG6UPIcHw49iRyRdPmOC4Z+kh7bwLIj7PjxhJKKoHbt+99J9VjcX59MsIuAnUbafVv1M=';
        /*if(com.getEnv() == 'production'){
            return com.getCookie("api_token2") ? com.getCookie("api_token2") : '';
        }else{
        }*/
    })(),
    tmpObj:{},
};

$(function(){
    //com.init();
    template.defaults.imports.log = console.log;
    template.defaults.imports.com = com;
    template.defaults.imports.path = para.path;
    app.ajax({
        type:'get',
        url:app.api("/api/getAccountUser/" + para.token),
        async:false,
        success:function(res){
            if(res.code == 0){
                para.staffList = template('inbox-layerSelect', res.data);
                para.staffListData = res.data;
                para.staffId = res.data.data[0].email_cs_admin_id;
            }else{
                alert(res.msg)
            }
        }
    });
});
</script>
<script src="./src/js/router.js"></script>
</body>
</html>